import  { useState } from "react";
import { InboxOutlined } from "@ant-design/icons";
import type { UploadProps,UploadFile } from "antd";
import {  Upload } from "antd";
import UploadVideo from "../../../upload/UploadVideo";
const { Dragger } = Upload;
export default function CreateFilm() {
  const [fileList, setFileList] = useState<UploadFile[]>([]);
  const [uploading, setUploading] = useState(false);
  const props: UploadProps = {
    name: "file",
    multiple: false,
    onChange(info) {

    },
    onDrop(e) {
      console.log("Dropped files", e.dataTransfer.files);
    },
    beforeUpload: (file:UploadFile) => {
      setFileList([...fileList, file]);
      return false;
    },
  };
  return (
    <div>
      <Dragger {...props}>
        <p className="ant-upload-drag-icon">
          <InboxOutlined />
        </p>
        <p className="ant-upload-text">
          点击或者拖拽上传文件
        </p>
        <p className="ant-upload-hint">
         可以上传单个文件
        </p>
      </Dragger>
    </div>
  );
}
